package com.atg;

import com.atg.atgchat.init.MainApplication;
import com.atg.atgchat.init.user.model.enums.IdempotentTypeEnum;
import com.atg.atgchat.init.user.model.enums.ItemEnum;
import com.atg.atgchat.init.user.service.UserBackpackService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;


/*
author: atg
time: 2025/1/17 13:26
*/
@SpringBootTest(classes = { MainApplication.class}) // 显式指定主配置类
@RunWith(SpringRunner.class)
@Slf4j
public class test {
    public static final long UID = 1879100377527713794L;
    @Resource // 确保使用 @Autowired 进行依赖注入
    private UserBackpackService userBackpackService;
    @Test
    public void acquireItem(){
        userBackpackService.acquireItem(UID, ItemEnum.REG_TOP10_BADGE.getId(), IdempotentTypeEnum.UID, UID+"");
    }
}